import Layout from "@/view/Layout/index.vue";
import Home from "@/view/Home/index.vue"
import Register from '@/view/Register/index.vue'
import NanJing from '@/view/Layout/NanJing/index.vue'
import ConfinementNerse from '@/view/Layout/NanJing/ConfinementNurse/index.vue'
import City from '@/view/Layout/City/index.vue'
import JiaZheng from '@/view/Layout/NanJing/JiaZheng/index.vue'
import { createRouter, createWebHistory } from "vue-router";

export const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            component: Layout,
            children:[
                {
                    path: '',
                    component: Home
                }
            ]
        },
        {
            path: '/city',
            component: City,
        },
        {
            path: '/register',
            component: Register
        },
        {
            path : '/nanjing',
            component: NanJing,
            children: [
                {
                    path: '',
                    component: ConfinementNerse
                },
                {
                    path: '/nanjing/month',
                    component: ConfinementNerse
                },
                {
                    path: '/nanjing/jiazheng',
                    component: JiaZheng
                }

            ]
        }
    ]
})